package weiy.top.modules.attr.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import weiy.top.modules.attr.entity.PmsAttrAttrgroupRelation;
import weiy.top.modules.attr.mapper.PmsAttrAttrgroupRelationMapper;
import weiy.top.modules.attr.service.IPmsAttrAttrgroupRelationService;

import java.util.List;

/**
 * @Description: pms_attr_attrgroup_relation
 * @Author: weihancheng
 * @Date:   2021-11-24
 * @Version: V1.0
 */
@Service
public class PmsAttrAttrgroupRelationServiceImpl extends ServiceImpl<PmsAttrAttrgroupRelationMapper, PmsAttrAttrgroupRelation> implements IPmsAttrAttrgroupRelationService {

    @Override
    public void deleteBatchRelation(List<PmsAttrAttrgroupRelation> entities) {
        baseMapper.deleteBatchRelation(entities);
    }

//    @Override
//    public void deleteBatchRelation(List<PmsAttrAttrgroupRelation> entities) {
//        LambdaQueryWrapper<PmsAttrAttrgroupRelation> queryWrapper = new LambdaQueryWrapper<>();
//        for (PmsAttrAttrgroupRelation entity : entities) {
//            queryWrapper.or(query ->
//                    query.eq(PmsAttrAttrgroupRelation::getAttrGroupId, entity.getAttrGroupId())
//                    .eq(PmsAttrAttrgroupRelation::getAttrId, entity.getAttrId())
//            );
//        }
//        this.remove(queryWrapper);
//    }
}
